class WorkflowMailer < ActionMailer::Base  
  def workflow(workflow, recipients, from, attachable)
    recipients recipients
    from       from
    subject    "Workflow Execution Report: #{workflow.name}"
    body       :workflow => workflow
    
    if attachable
      attachment :content_type => attachable[:mime_type], 
                 :filename => attachable[:filename] do |a|
        a.body = attachable[:content]
      end
    end
  end
end
